package com.yykj.user.center.server.model;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.yykj.common.util.serializer.LocalDate2LongSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.UpdateTimestamp;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.validation.constraints.NotBlank;
import java.time.LocalDateTime;

/**
 * @author chenl
 * @version 1.0
 * @date 2021/11/16 22:48
 */
@Data
@Entity
public class RelationGroupPatient {

    @Id
    private String id;

    private String patientCardId;

    private String patientName;

    private String sex;

    private Integer age;

    private String remarks;

    private Integer hospitalId;

    @ApiModelProperty("分组或标签名称")
    private String name;

    private String groupId;

    private String doctorId;

    @ApiModelProperty("创建时间")
    @JsonSerialize(using = LocalDate2LongSerializer.class)
    @CreationTimestamp
    private LocalDateTime createTime;

    @ApiModelProperty("更新时间")
    @JsonSerialize(using = LocalDate2LongSerializer.class)
    @UpdateTimestamp
    private LocalDateTime updateTime;

    @ApiModelProperty("类型：1分组 2标签")
    private Integer type=1;

    @ApiModelProperty("订单来源类型：11、图文问诊 12、语音问诊 13、视频问诊 14、检查订单 15、检验订单")
    private Integer originOrderType;
}
